home *** CD-ROM | disk | FTP | other *** search
/ SGI Varsity Update 1998 August / SGI Varsity Update 1998 August.iso / dist / patchSG0002824.idb / usr / include / mntent.h.z / mntent.h
C/C++ Source or Header  |  1998-07-29  |  6KB  |  142 lines

  1. #ifndef __MNTENT_H__
  2. #define __MNTENT_H__
  3. #ident "$Revision: 1.37 $"
  4. /*
  5. *
  6. * Copyright 1992, Silicon Graphics, Inc.
  7. * All Rights Reserved.
  8. *
  9. * This is UNPUBLISHED PROPRIETARY SOURCE CODE of Silicon Graphics, Inc.;
  10. * the contents of this file may not be disclosed to third parties, copied or
  11. * duplicated in any form, in whole or in part, without the prior written
  12. * permission of Silicon Graphics, Inc.
  13. *
  14. * RESTRICTED RIGHTS LEGEND:
  15. * Use, duplication or disclosure by the Government is subject to restrictions
  16. * as set forth in subdivision (c)(1)(ii) of the Rights in Technical Data
  17. * and Computer Software clause at DFARS 252.227-7013, and/or in similar or
  18. * successor clauses in the FAR, DOD or NASA FAR Supplement. Unpublished -
  19. * rights reserved under the Copyright Laws of the United States.
  20. */
  21. /*    @(#)mntent.h    1.3 88/05/20 4.0NFSSRC SMI;    from SMI 1.13 99/01/06    */
  22. #include <stdio.h>
  23.  
  24. /*
  25.  * File system table, see mntent (5)
  26.  *
  27.  * Used by dump, mount, umount, swap, fsck, df, ...
  28.  *
  29.  * Quota files are always named "quotas", so if type is "rq",
  30.  * then use concatenation of mnt_dir and "quotas" to locate
  31.  * quota file.
  32.  */
  33.  
  34. #define    MNTTAB        "/etc/fstab"
  35. #define    MOUNTED        "/etc/mtab"
  36.  
  37. #define    MNTMAXSTR    256
  38.  
  39. #include <sys/fsid.h>
  40.  
  41. #define MNTTYPE_EFS    FSID_EFS    /* extent filesystem */
  42. #define MNTTYPE_NFS    FSID_NFS    /* network file system */
  43. #define MNTTYPE_NFS2    FSID_NFS2    /* network file system V2 */
  44. #define MNTTYPE_NFS3    FSID_NFS3    /* network file system V3.0 */
  45. #define MNTTYPE_SOCKET    FSID_SOCKET    /* socket pseudo-filesystem */
  46. #define MNTTYPE_DBG    FSID_DBG    /* debug (proc) pseudo-filesystem */
  47. #define MNTTYPE_PROC    FSID_PROCFS    /* proc file system */
  48. #define MNTTYPE_PIPE    FSID_COM    /* pipe pseudo-filesystem */
  49. #define MNTTYPE_CACHEFS    FSID_CACHEFS    /* cache file system */
  50. #define MNTTYPE_XFS    FSID_XFS    /* SGI XFS file system */
  51. #define MNTTYPE_HWGFS    FSID_HWGFS    /* Hardware graph file system */
  52. #define MNTTYPE_MFS    "mfs"         /* mfs filesystem - ClearCase */
  53. #define    MNTTYPE_PC    "pc"        /* IBM PC (MSDOS) file system */
  54. #define    MNTTYPE_SWAP    "swap"        /* swap file system */
  55. #define    MNTTYPE_IGNORE    "ignore"     /* No type specified; ignore entry */
  56. #define MNTTYPE_AUTOFS  FSID_AUTOFS        /* automount file system */
  57. #define MNTTYPE_LOFS    FSID_LOFS        /* loopback file system */
  58. #define    MNTTYPE_DOS    "dos"        /* MS-DOS file system (SGI) */
  59. #define MNTTYPE_FD    FSID_FD        /* /dev/fd file system */
  60. #define MNTTYPE_AFS    "afs"        /* Andrew File System */
  61. #define MNTTYPE_RAWDATA "rawdata"       /* raw partition used for data */
  62.  
  63. #define    MNTOPT_RO    "ro"        /* read only */
  64. #define    MNTOPT_RW    "rw"        /* read/write */
  65. #define    MNTOPT_QUOTA    "quota"        /* quotas */
  66. #define    MNTOPT_NOQUOTA    "noquota"    /* no quotas */
  67. #define    MNTOPT_NOSUID    "nosuid"    /* disallow setuid program execution */
  68. #define MNTOPT_NODEV    "nodev"        /* disallow access to device files */
  69. #define    MNTOPT_NOAUTO    "noauto"    /* hide entry from mount -a */
  70. #define MNTOPT_GRPID     "grpid"        /* SysV-compatible group-id on create */
  71. #define MNTOPT_REMOUNT    "remount"    /* change options on previous mount */
  72. #define MNTOPT_RAW    "raw"        /* raw device name */
  73. #define MNTOPT_FSCK    "fsck"        /* fsck by default */
  74. #define MNTOPT_NOFSCK    "nofsck"    /* do not fsck */
  75. #define    MNTOPT_SOFT    "soft"        /* soft mount */
  76. #define    MNTOPT_HARD    "hard"        /* hard mount */
  77. #define    MNTOPT_NOINTR    "nointr"    /* disallow interrupts on hard mount */
  78. #define    MNTOPT_NOAC    "noac"        /* don't cache nfs attributes */
  79. #define MNTOPT_PORT    "port"        /* server IP port number */
  80. #define MNTOPT_RETRANS    "retrans"    /* set number of request retries */
  81. #define MNTOPT_RSIZE    "rsize"        /* set read size (bytes) */
  82. #define MNTOPT_WSIZE    "wsize"        /* set write size (bytes) */
  83. #define MNTOPT_TIMEO    "timeo"        /* set initial timeout (1/10 sec) */
  84. #define MNTOPT_ACTIMEO    "actimeo"    /* attr cache timeout (sec) */
  85. #define MNTOPT_ACREGMIN    "acregmin"    /* min ac timeout for reg files (sec) */
  86. #define MNTOPT_ACREGMAX    "acregmax"    /* max ac timeout for reg files (sec) */
  87. #define MNTOPT_ACDIRMIN    "acdirmin"    /* min ac timeout for dirs (sec) */
  88. #define MNTOPT_ACDIRMAX    "acdirmax"    /* max ac timeout for dirs (sec) */
  89. #define MNTOPT_PRIVATE    "private"    /* mount nfs single-client tree */
  90. #define MNTOPT_SHORTUID    "shortuid"    /* don't allow writes by uids>0xffff */
  91. #define MNTOPT_SYMTTL    "symttl"    /* symlink cache time-to-live */
  92. #define MNTOPT_SWPLO    "swplo"        /* first block(512 byte) to use */
  93. #define MNTOPT_LENGTH    "length"    /* # 512 byte blocks */
  94. #define MNTOPT_MAXLENGTH "maxlength"    /* max # 512 byte blocks to grow to */
  95. #define MNTOPT_VLENGTH    "vlength"    /* virtual # 512 byte blocks */
  96. #define MNTOPT_PRI    "pri"        /* priority of device */
  97. #define MNTOPT_EAG    "eag"        /* extended attributes (plan G) */
  98. #define MNTOPT_NOMTAB    "nomtab"    /* do not make an entry into mtab */
  99. #define    MNTOPT_LOGBUFS    "logbufs"    /* number of xFS log buffers */
  100. #define    MNTOPT_LOGBSIZE    "logbsize"    /* size of xFS log buffers */
  101. #define    MNTOPT_DMI    "dmi"        /* DMI enabled (XFS only) */
  102. #define    MNTOPT_QUOTA    "quota"        /* quotas */
  103. #define    MNTOPT_NOQUOTA    "noquota"    /* no quotas */
  104. #define MNTOPT_UQUOTA    "uquota"    /* user quota enabled (XFS only) */
  105. #define MNTOPT_PQUOTA    "pquota"    /* project quota enabled (XFS only) */
  106. #define MNTOPT_UQUOTANOENF "uqnoenforce"/* user quota limit enforcement */
  107. #define MNTOPT_PQUOTANOENF "pqnoenforce"/* project quota limit enforcement */
  108. #define MNTOPT_QUOTANOENF  "qnoenforce" /* same as uqnoenforce */
  109. #define    MNTOPT_WSYNC    "wsync"        /* safe-mode nfs compatible mount */
  110. #define MNTOPT_ASYNCNLM    "asyncnlm"    /* async NLM test calls */
  111. #define    MNTOPT_INO64    "ino64"        /* force inodes into 64-bit range */
  112. #define    MNTOPT_VERS    "vers"        /* nfs protocol version */
  113. #define    MNTOPT_PROTO    "proto"         /* udp/tcp protocol specifier */
  114. #define    MNTOPT_
  115. #define MNTINFO_DEV     "dev"   /* device number of the mounted file system */
  116. #define MNTINFO_LOFSID  "lofsid" /* id for mounted loopback file system */
  117.  
  118. struct mntent {
  119.     char    *mnt_fsname;        /* name of mounted file system */
  120.     char    *mnt_dir;        /* file system path prefix */
  121.     char    *mnt_type;        /* MNTTYPE_* */
  122.     char    *mnt_opts;        /* MNTOPT* */
  123.     int    mnt_freq;        /* dump frequency, in days */
  124.     int    mnt_passno;        /* pass number on parallel fsck */
  125. };
  126.  
  127. #ifdef __cplusplus
  128. extern "C" {
  129. #endif
  130.  
  131. FILE        *setmntent(const char *, const char *);
  132. struct mntent    *getmntent(FILE *);
  133. int        addmntent(FILE *, struct mntent *);
  134. char        *hasmntopt(struct mntent *, const char *);
  135. int        getmntany( FILE *, struct mntent *, struct mntent *);
  136. int        endmntent(FILE *);
  137.  
  138. #ifdef __cplusplus
  139. }
  140. #endif
  141. #endif /* !__MNTENT_H__ */
  142.